class BootStrap {

    def init = {servletContext ->
//        switch (GrailsUtil.environment) {
//            case "development":

                //SoC: add some starter info to work with -- TODO move this to dev status only
                Corpus c1 = new Corpus(name: 'First-Test-Corpus', category: 'test', description: 'just test information. delete or change at your leisure')
                Book b1a = new Book(title: "Angela's Ashes", description: "sample book information, should be connected to the first corpus")
                Book b1b = new Book(title: "Beauty and the Beast", description: "sample book information, should be connected to the first corpus")
                c1.addToBooks(b1a)
                c1.addToBooks(b1b)
                c1.save(flush: true)

                Corpus c2 = new Corpus(name: 'Second-Test-Corpus', category: 'test', description: 'second example of test corpus. delete or change at your leisure')
                Book b2c = new Book(title: "Charlie and the Chocolate Factory", description: "sample book information, should be connected to the second corpus")
                Book b2d = new Book(title: "Dangerous Demands", description: "sample book information, should be connected to the second corpus")
                c2.addToBooks(b2c)
                c2.addToBooks(b2d)
                c2.save(flush: true)

//                break
//
//            case "production":
//                break
//        }
    }


    def destroy = {
    }
}